.class public Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;
.super Lcom/waiqin365/lightapp/base/WqBaseActivity;

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field private a:Landroid/widget/ImageView;

.field private b:Landroid/widget/TextView;

.field private c:Landroid/widget/TextView;

.field private d:Landroid/os/Bundle;

.field private e:Ljava/util/HashMap;

.field private f:Ljava/lang/String;

.field private g:I

.field private h:I

.field private i:Ljava/util/ArrayList;

.field private j:Landroid/widget/LinearLayout;

.field private k:Landroid/view/View;

.field private l:Z


# direct methods
.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Lcom/waiqin365/lightapp/base/WqBaseActivity;-><init>()V

    return-void
.end method

.method private a()V
    .locals 9

    const/4 v3, 0x0

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->j:Landroid/widget/LinearLayout;

    invoke-virtual {v0}, Landroid/widget/LinearLayout;->removeAllViews()V

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->k:Landroid/view/View;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    move v2, v3

    :goto_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->i:Ljava/util/ArrayList;

    if-eqz v0, :cond_3

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->i:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-ge v2, v0, :cond_3

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->i:Ljava/util/ArrayList;

    invoke-virtual {v0, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/kehu/b/bd;

    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/bd;->h:Ljava/lang/String;

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->i:Ljava/util/ArrayList;

    invoke-virtual {v0, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/kehu/b/bd;

    iget-object v4, v0, Lcom/waiqin365/lightapp/kehu/b/bd;->g:Ljava/lang/String;

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->e:Ljava/util/HashMap;

    invoke-virtual {v0, v1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    new-instance v5, Lcom/waiqin365/lightapp/view/LabelViewV;

    invoke-direct {v5, p0}, Lcom/waiqin365/lightapp/view/LabelViewV;-><init>(Landroid/content/Context;)V

    invoke-virtual {v5, v4}, Lcom/waiqin365/lightapp/view/LabelViewV;->setLabel(Ljava/lang/CharSequence;)V

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v4

    if-nez v4, :cond_1

    const-string/jumbo v4, "id"

    invoke-virtual {v4, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-nez v4, :cond_1

    const-string/jumbo v4, "is_main"

    invoke-virtual {v4, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_1

    invoke-virtual {v5, v0}, Lcom/waiqin365/lightapp/view/LabelViewV;->setContent(Ljava/lang/String;)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->i:Ljava/util/ArrayList;

    invoke-virtual {v1, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/waiqin365/lightapp/kehu/b/bd;

    iget-object v4, v1, Lcom/waiqin365/lightapp/kehu/b/bd;->d:Ljava/lang/String;

    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->i:Ljava/util/ArrayList;

    invoke-virtual {v1, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/waiqin365/lightapp/kehu/b/bd;

    iget-object v1, v1, Lcom/waiqin365/lightapp/kehu/b/bd;->a:Ljava/lang/String;

    const-string/jumbo v6, "G"

    invoke-virtual {v1, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    invoke-static {v4}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_0

    :try_start_0
    new-instance v6, Lorg/json/JSONArray;

    invoke-direct {v6, v4}, Lorg/json/JSONArray;-><init>(Ljava/lang/String;)V

    move v1, v3

    :goto_1
    if-eqz v6, :cond_0

    invoke-virtual {v6}, Lorg/json/JSONArray;->length()I

    move-result v4

    if-ge v1, v4, :cond_0

    invoke-virtual {v6, v1}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v4

    const-string/jumbo v7, "role_id"

    const-string/jumbo v8, ""

    invoke-virtual {v4, v7, v8}, Lorg/json/JSONObject;->optString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v0, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_2

    const-string/jumbo v0, "role_name"

    const-string/jumbo v1, ""

    invoke-virtual {v4, v0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v5, v0}, Lcom/waiqin365/lightapp/view/LabelViewV;->setContent(Ljava/lang/String;)V
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    :cond_0
    :goto_2
    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->j:Landroid/widget/LinearLayout;

    invoke-virtual {v0, v5}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    :cond_1
    add-int/lit8 v0, v2, 0x1

    move v2, v0

    goto/16 :goto_0

    :cond_2
    add-int/lit8 v1, v1, 0x1

    goto :goto_1

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    goto :goto_2

    :cond_3
    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->j:Landroid/widget/LinearLayout;

    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->j:Landroid/widget/LinearLayout;

    invoke-virtual {v1}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    instance-of v1, v0, Lcom/waiqin365/lightapp/kehu/view/CMCustomView;

    if-eqz v1, :cond_4

    check-cast v0, Lcom/waiqin365/lightapp/kehu/view/CMCustomView;

    invoke-virtual {v0, v3}, Lcom/waiqin365/lightapp/kehu/view/CMCustomView;->setBottomLineStatus(Z)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->k:Landroid/view/View;

    invoke-virtual {v0, v3}, Landroid/view/View;->setVisibility(I)V

    :cond_4
    return-void
.end method

.method private b()V
    .locals 2

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->d:Landroid/os/Bundle;

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->d:Landroid/os/Bundle;

    const-string/jumbo v1, "linkman"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getSerializable(Ljava/lang/String;)Ljava/io/Serializable;

    move-result-object v0

    check-cast v0, Ljava/util/HashMap;

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->e:Ljava/util/HashMap;

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->d:Landroid/os/Bundle;

    const-string/jumbo v1, "linkmanConfig"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getSerializable(Ljava/lang/String;)Ljava/io/Serializable;

    move-result-object v0

    check-cast v0, Ljava/util/ArrayList;

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->i:Ljava/util/ArrayList;

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->d:Landroid/os/Bundle;

    const-string/jumbo v1, "comefrom"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getInt(Ljava/lang/String;)I

    move-result v0

    iput v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->g:I

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->d:Landroid/os/Bundle;

    const-string/jumbo v1, "position"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getInt(Ljava/lang/String;)I

    move-result v0

    iput v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->h:I

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->d:Landroid/os/Bundle;

    const-string/jumbo v1, "cmId"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->f:Ljava/lang/String;

    return-void
.end method

.method private c()V
    .locals 2

    const v0, 0x7f0c01da

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->a:Landroid/widget/ImageView;

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->a:Landroid/widget/ImageView;

    invoke-virtual {v0, p0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const v0, 0x7f0c0305

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->b:Landroid/widget/TextView;

    const v0, 0x7f0c0309

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->c:Landroid/widget/TextView;

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->b:Landroid/widget/TextView;

    const v1, 0x7f080505

    invoke-virtual {p0, v1}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->c:Landroid/widget/TextView;

    const v1, 0x7f08028c

    invoke-virtual {p0, v1}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->c:Landroid/widget/TextView;

    invoke-virtual {v0, p0}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const v0, 0x7f0c0243

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->j:Landroid/widget/LinearLayout;

    const v0, 0x7f0c0244

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->k:Landroid/view/View;

    return-void
.end method

.method private d()V
    .locals 4

    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    new-instance v1, Landroid/os/Bundle;

    invoke-direct {v1}, Landroid/os/Bundle;-><init>()V

    const-string/jumbo v2, "linkman"

    iget-object v3, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->e:Ljava/util/HashMap;

    invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->putSerializable(Ljava/lang/String;Ljava/io/Serializable;)V

    const-string/jumbo v2, "position"

    iget v3, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->h:I

    invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    const-string/jumbo v2, "storeBoss"

    iget-boolean v3, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->l:Z

    invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V

    invoke-virtual {v0, v1}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;

    const/16 v1, 0x6d

    invoke-virtual {p0, v1, v0}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->setResult(ILandroid/content/Intent;)V

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->back()V

    return-void
.end method


# virtual methods
.method protected onActivityResult(IILandroid/content/Intent;)V
    .locals 4

    const/4 v3, -0x1

    sparse-switch p2, :sswitch_data_0

    :goto_0
    invoke-super {p0, p1, p2, p3}, Lcom/waiqin365/lightapp/base/WqBaseActivity;->onActivityResult(IILandroid/content/Intent;)V

    return-void

    :sswitch_0
    invoke-virtual {p3}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v1

    const-string/jumbo v0, "returnEvtType"

    invoke-virtual {v1, v0, v3}, Landroid/os/Bundle;->getInt(Ljava/lang/String;I)I

    move-result v0

    const/4 v2, 0x6

    if-ne v0, v2, :cond_0

    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    invoke-virtual {v0, v1}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;

    invoke-virtual {p0, v3, v0}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->setResult(ILandroid/content/Intent;)V

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->finish()V

    const v0, 0x7f040020

    const v1, 0x7f040023

    invoke-virtual {p0, v0, v1}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->overridePendingTransition(II)V

    goto :goto_0

    :cond_0
    const-string/jumbo v0, "linkman"

    invoke-virtual {v1, v0}, Landroid/os/Bundle;->getSerializable(Ljava/lang/String;)Ljava/io/Serializable;

    move-result-object v0

    check-cast v0, Ljava/util/HashMap;

    const-string/jumbo v2, "storeBoss"

    const/4 v3, 0x0

    invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;Z)Z

    move-result v1

    iput-boolean v1, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->l:Z

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->e:Ljava/util/HashMap;

    invoke-direct {p0}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->a()V

    goto :goto_0

    :sswitch_1
    invoke-virtual {p3}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v0

    const-string/jumbo v1, "linkman"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getSerializable(Ljava/lang/String;)Ljava/io/Serializable;

    move-result-object v0

    check-cast v0, Ljava/util/HashMap;

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->e:Ljava/util/HashMap;

    invoke-direct {p0}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->a()V

    goto :goto_0

    :sswitch_data_0
    .sparse-switch
        -0x1 -> :sswitch_0
        0x7f -> :sswitch_1
    .end sparse-switch
.end method

.method public onBackPressed()V
    .locals 0

    invoke-direct {p0}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->d()V

    return-void
.end method

.method public onClick(Landroid/view/View;)V
    .locals 4

    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    sparse-switch v0, :sswitch_data_0

    :goto_0
    return-void

    :sswitch_0
    invoke-direct {p0}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->d()V

    goto :goto_0

    :sswitch_1
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/waiqin365/lightapp/kehu/CMContactEditActivity;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    new-instance v1, Landroid/os/Bundle;

    invoke-direct {v1}, Landroid/os/Bundle;-><init>()V

    const-string/jumbo v2, "linkman"

    iget-object v3, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->e:Ljava/util/HashMap;

    invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->putSerializable(Ljava/lang/String;Ljava/io/Serializable;)V

    const-string/jumbo v2, "linkmanConfigs"

    iget-object v3, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->i:Ljava/util/ArrayList;

    invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->putSerializable(Ljava/lang/String;Ljava/io/Serializable;)V

    const-string/jumbo v2, "comefrom"

    iget v3, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->g:I

    invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    const-string/jumbo v2, "cmId"

    iget-object v3, p0, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->f:Ljava/lang/String;

    invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual {v0, v1}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;

    const/16 v1, 0x6b

    invoke-virtual {p0, v0, v1}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->startActivityForResult(Landroid/content/Intent;I)V

    const v0, 0x7f040022

    const v1, 0x7f040021

    invoke-virtual {p0, v0, v1}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->overridePendingTransition(II)V

    goto :goto_0

    :sswitch_data_0
    .sparse-switch
        0x7f0c01da -> :sswitch_0
        0x7f0c0309 -> :sswitch_1
    .end sparse-switch
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 1

    invoke-super {p0, p1}, Lcom/waiqin365/lightapp/base/WqBaseActivity;->onCreate(Landroid/os/Bundle;)V

    invoke-static {p0}, Lcom/fiberhome/gaea/client/d/a;->b(Landroid/app/Activity;)V

    const v0, 0x7f030055

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->setContentView(I)V

    invoke-direct {p0}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->b()V

    invoke-direct {p0}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->c()V

    invoke-direct {p0}, Lcom/waiqin365/lightapp/kehu/CMContactDetailsActivity;->a()V

    return-void
.end method
